#!/usr/bin/env python3
"""
色块下载器主程序
启动PySide6 GUI应用程序
"""

import sys
import os
from pathlib import Path

# 添加项目根目录到Python路径
project_root = Path(__file__).parent
sys.path.insert(0, str(project_root))

from src.app.application import ColorBlockDownloaderApp


def main():
    """主函数：启动色块下载器应用"""
    try:
        app = ColorBlockDownloaderApp()
        return app.run()
    except Exception as e:
        print(f"应用启动失败: {e}")
        return 1


if __name__ == "__main__":
    sys.exit(main())